/**
 * Settle模块路由配置
 * @description 商户结算管理模块的路由配置
 * @author AI Assistant
 * @since 1.0.0
 */

import { Layout } from '@/utils/routerHelper'

const { t } = useI18n()

const settleRouter: AppRouteRecordRaw = {
  path: '/settle',
  component: Layout,
  name: 'Settle',
  meta: {
    title: t('settle.menu.settle'),
    icon: 'ep:money',
    alwaysShow: true
  },
  children: [
    // 商户管理
    {
      path: 'merchant',
      component: () => import('@/views/settle/merchant/index.vue'),
      name: 'SettleMerchant',
      meta: {
        title: t('settle.menu.merchant'),
        icon: 'ep:office-building',
        activeMenu: '/settle/merchant'
      }
    },
    // 分账管理
    {
      path: 'split-rule',
      component: () => import('@/views/settle/splitRule/index.vue'),
      name: 'SettleSplitRule',
      meta: {
        title: t('settle.menu.splitRule'),
        icon: 'ep:pie-chart',
        activeMenu: '/settle/split-rule'
      }
    },
    // 结算管理
    {
      path: 'settle-order',
      component: () => import('@/views/settle/settleOrder/index.vue'),
      name: 'SettleOrder',
      meta: {
        title: t('settle.menu.settleOrder'),
        icon: 'ep:document-checked',
        activeMenu: '/settle/settle-order'
      }
    },
    // 子商户管理
    {
      path: 'sub-merchant',
      component: () => import('@/views/settle/subMerchant/index.vue'),
      name: 'SettleSubMerchant',
      meta: {
        title: t('settle.menu.subMerchant'),
        icon: 'ep:user-filled',
        activeMenu: '/settle/sub-merchant'
      }
    },
    // 支付管理
    {
      path: 'payment',
      component: () => import('@/views/settle/payment/index.vue'),
      name: 'SettlePayment',
      meta: {
        title: t('settle.menu.payment'),
        icon: 'ep:credit-card',
        activeMenu: '/settle/payment'
      }
    },
    // 余额管理
    {
      path: 'balance',
      component: () => import('@/views/settle/balance/index.vue'),
      name: 'SettleBalance',
      meta: {
        title: t('settle.menu.balance'),
        icon: 'ep:wallet',
        activeMenu: '/settle/balance'
      }
    },
    // 对账管理
    {
      path: 'reconciliation',
      component: () => import('@/views/settle/reconciliation/index.vue'),
      name: 'SettleReconciliation',
      meta: {
        title: t('settle.menu.reconciliation'),
        icon: 'ep:document-copy',
        activeMenu: '/settle/reconciliation'
      }
    },
    // 提现管理
    {
      path: 'withdraw',
      component: () => import('@/views/settle/withdraw/index.vue'),
      name: 'SettleWithdraw',
      meta: {
        title: t('settle.menu.withdraw'),
        icon: 'ep:coin',
        activeMenu: '/settle/withdraw'
      }
    }
  ]
}

export default settleRouter
